﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    >
    <!--Horizontal Thumb-->
    <Style x:Key="HorizontalThumbStyle" TargetType="{x:Type Thumb}">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.2" Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity" To="1"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.1" Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>

                        <Trigger Property="IsEnabled" Value="False">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.2" Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Opacity" To="0" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.2" Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Opacity" To="1" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="IsDragging" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.2" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="1"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.2" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                    <Grid>
                        <Grid.LayoutTransform>
                            <RotateTransform Angle="90" />
                        </Grid.LayoutTransform>
                        <Grid x:Name="ThumbVisual">
                            <Rectangle Fill="{DynamicResource BackgroundBrush_VerticalThumb}" x:Name="Background" RadiusX="1.5" RadiusY="1.5" StrokeThickness="1" Stroke="{DynamicResource BorderBrush_VerticalThumb}">
                            </Rectangle>
                            <Rectangle Fill="{DynamicResource HighlightBackgroundBrush_VerticalThumb}" x:Name="BackgroundMouseOver" RadiusX="1.5" RadiusY="1.5" StrokeThickness="1" Stroke="{DynamicResource HighlightBorderBrush_VerticalThumb}" Opacity="0">
                            </Rectangle>
                            <Rectangle Fill="{DynamicResource PressedBackgroundBrush_VerticalThumb}" x:Name="BackgroundPressed" RadiusX="1.5" RadiusY="1.5" StrokeThickness="1" Stroke="{DynamicResource PressedBorderBrush_VerticalThumb}" Opacity="0">

                            </Rectangle>

                            <Path Margin="0,-6,0,0" Width="11" Height="1" Stretch="Fill" Stroke="#FF848485" StrokeThickness="1" Data="M4.8333325,7.2499995 L12.012101,7.2499995" VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="-0.062,0.5" StartPoint="1.062,0.5">
                                        <GradientStop Color="#FFC8C9CC" Offset="0.487" />
                                        <GradientStop Color="#FFF0F0F0" Offset="0.518" />
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Path Margin="0,-2,0,0" Width="11" Height="1" Stretch="Fill" Stroke="#FF848485" StrokeThickness="1" Data="M4.8333325,7.2499995 L12.012101,7.2499995" VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="-0.062,0.5" StartPoint="1.062,0.5">
                                        <GradientStop Color="#FFC8C9CC" Offset="0.487" />
                                        <GradientStop Color="#FFF0F0F0" Offset="0.518" />
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Path Margin="0,0,0,-2" Width="11" Height="1" Stretch="Fill" Stroke="#FF848485" StrokeThickness="1" Data="M4.8333325,7.2499995 L12.012101,7.2499995" VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="-0.062,0.5" StartPoint="1.062,0.5">
                                        <GradientStop Color="#FFC8C9CC" Offset="0.487" />
                                        <GradientStop Color="#FFF0F0F0" Offset="0.518" />
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Path Margin="0,0,0,-6" Width="11" Height="1" Stretch="Fill" Stroke="#FF848485" StrokeThickness="1" Data="M4.8333325,7.2499995 L12.012101,7.2499995" VerticalAlignment="Center" HorizontalAlignment="Center">

                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="-0.062,0.5" StartPoint="1.062,0.5">
                                        <GradientStop Color="#FFC8C9CC" Offset="0.487" />
                                        <GradientStop Color="#FFF0F0F0" Offset="0.518" />
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Rectangle Fill="Transparent" x:Name="Highlight" Margin="1" RadiusX="0.5" RadiusY="0.5" Stroke="#00FFFFFF" StrokeThickness="1" Opacity="0.6" IsHitTestVisible="false" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <!--ScrollBar RepeatButton-->
    <Style x:Key="ScrollBarRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Foreground" Value="#FF042271"/>
        <Setter Property="FontFamily" Value="Trebuchet MS" />
        <Setter Property="FontSize" Value="12" />
        <Setter Property="Padding" Value="3"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.2" Storyboard.TargetName="BackgroundOver" Storyboard.TargetProperty="Opacity" To="1"/>
                                        <DoubleAnimation Duration="00:00:00.2" Storyboard.TargetName="BackgroundOver_Highlight" Storyboard.TargetProperty="Opacity" To="0.65"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.2" Storyboard.TargetName="BackgroundOver" Storyboard.TargetProperty="Opacity" To="0"/>
                                        <DoubleAnimation Duration="00:00:00.2" Storyboard.TargetName="BackgroundOver_Highlight" Storyboard.TargetProperty="Opacity" To="0.0"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>

                        <Trigger Property="IsEnabled" Value="False">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                         <Storyboard>
                                            <DoubleAnimation Duration="0" Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity" To="1"/>
                                        </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </BeginStoryboard>
                                </Trigger.ExitActions>

                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="1"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                    <Grid>


                        <Border x:Name="BackgroundNorm" BorderBrush="{DynamicResource NormalBorderBrush_ScrollBarRepeatButton}" Background="{DynamicResource NormalBrush_ScrollBarRepeatButton}"  BorderThickness="0" CornerRadius="1.75">                           
                        </Border>
                        <Border x:Name="BackgroundNorm_highlight" Margin="0" BorderBrush="{DynamicResource HighlightBorderBrush_ScrollBarRepeatButton}" BorderThickness="0" CornerRadius="1" Opacity="0.65"/>
                        <Border x:Name="BackgroundOver" Background="{DynamicResource HighlightBrush_ScrollBarRepeatButton}" BorderBrush="{DynamicResource HighlightBorderBrush_ScrollBarRepeatButton}" BorderThickness="1" CornerRadius="1.75" Opacity="0">
                        </Border>
                        <Border x:Name="BackgroundOver_Highlight" BorderBrush="{DynamicResource HighlightOverBorderBrush_ScrollBarRepeatButton}" Margin="0" BorderThickness="1,1,1,1" CornerRadius="1" Opacity="0">
                        </Border>
                        <Border Background="{DynamicResource PressedBrush_ScrollBarRepeatButton}" BorderBrush="{DynamicResource PressedBorderBrush_ScrollBarRepeatButton}" x:Name="BackgroundPressed" BorderThickness="1" CornerRadius="1.75" Opacity="0">                         
                        </Border>
                        <Border x:Name="BackgoundPressed_Highlight" BorderBrush="{DynamicResource PressedHighlightBorderBrush_ScrollBarRepeatButton}" Margin="0" BorderThickness="1,1,1,1" CornerRadius="1" Opacity="0">
                        </Border>
                        <Border x:Name="DisabledVisualElement" Background="#3FFFFFFF" BorderBrush="#D8FFFFFF" CornerRadius="1.75" IsHitTestVisible="false" Visibility="Collapsed"/>
                        
                        <Border x:Name="FocusVisualElement" Margin="-1" BorderBrush="#FFE99862" BorderThickness="1" CornerRadius="2.75" IsHitTestVisible="false" Visibility="Collapsed"/>
                        <Path 
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Fill="Black"
            Data="{Binding Path=Content,RelativeSource={RelativeSource TemplatedParent}}" />

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Thumb-->
    <Style x:Key="ThumbStyle" TargetType="{x:Type Thumb}">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.2" Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity" To="1"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.1" Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>

                        <Trigger Property="IsEnabled" Value="False">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.2" Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Opacity" To="0" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.2" Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Opacity" To="1" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="IsDragging" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.2" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="1"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="00:00:00.2" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                    <Grid>
                        <Grid x:Name="ThumbVisual">
                            <Rectangle Fill="{DynamicResource BackgroundBrush_VerticalThumb}" x:Name="Background" RadiusX="1.5" RadiusY="1.5" StrokeThickness="1" Stroke="{DynamicResource PressedBorderBrush_VerticalThumb}">
                            </Rectangle>
                            <Rectangle Fill="{DynamicResource HighlightBackgroundBrush_VerticalThumb}" x:Name="BackgroundMouseOver" RadiusX="1.5" RadiusY="1.5" StrokeThickness="1" Stroke="{DynamicResource HighlightBorderBrush_VerticalThumb}" Opacity="0">
                            </Rectangle>
                            <Rectangle Fill="{DynamicResource PressedBackgroundBrush_VerticalThumb}" x:Name="BackgroundPressed" RadiusX="1.5" RadiusY="1.5" StrokeThickness="1" Stroke="{DynamicResource PressedBorderBrush_VerticalThumb}" Opacity="0">

                            </Rectangle>
                            <Path Margin="0,-6,0,0" Width="11" Height="1" Stretch="Fill" Stroke="#FF848485" StrokeThickness="1" Data="M4.8333325,7.2499995 L12.012101,7.2499995" VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="-0.062,0.5" StartPoint="1.062,0.5">
                                        <GradientStop Color="#FFC8C9CC" Offset="0.487"/>
                                        <GradientStop Color="#FFEFEFF0" Offset="0.518"/>
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Path Margin="0,-2,0,0" Width="11" Height="1" Stretch="Fill" Stroke="#FF848485" StrokeThickness="1" Data="M4.8333325,7.2499995 L12.012101,7.2499995" VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="-0.062,0.5" StartPoint="1.062,0.5">
                                        <GradientStop Color="#FFC8C9CC" Offset="0.487"/>
                                        <GradientStop Color="#FFEFEFF0" Offset="0.518"/>
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Path Margin="0,0,0,-2" Width="11" Height="1" Stretch="Fill" Stroke="#FF848485" StrokeThickness="1" Data="M4.8333325,7.2499995 L12.012101,7.2499995" VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="-0.062,0.5" StartPoint="1.062,0.5">
                                        <GradientStop Color="#FFC8C9CC" Offset="0.487"/>
                                        <GradientStop Color="#FFEFEFF0" Offset="0.518"/>
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Path Margin="0,0,0,-6" Width="11" Height="1" Stretch="Fill" Stroke="#FF848485" StrokeThickness="1" Data="M4.8333325,7.2499995 L12.012101,7.2499995" VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="-0.062,0.5" StartPoint="1.062,0.5">
                                        <GradientStop Color="#FFC8C9CC" Offset="0.487"/>
                                        <GradientStop Color="#FFEFEFF0" Offset="0.518"/>
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Rectangle Fill="Transparent" x:Name="Highlight" Margin="1" RadiusX="0.5" RadiusY="0.5" Stroke="#00FFFFFF" StrokeThickness="1" Opacity="0.6" IsHitTestVisible="false" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--PageButton-->
    <Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Border Background="Transparent" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
        <Border BorderBrush="{DynamicResource BorderBrush_VerticalTrackLayer}" Background="{DynamicResource Brush_VerticalTrackLayer}">
            <Grid >
            <Grid.RowDefinitions>
                <RowDefinition MaxHeight="18"/>
                <RowDefinition Height="0.00001*"/>
                <RowDefinition MaxHeight="18"/>
            </Grid.RowDefinitions>
            <Border
      Grid.RowSpan="3"
      CornerRadius="0" 
       />
            <RepeatButton 
      Grid.Row="0"                           
      Style="{StaticResource ScrollBarRepeatButtonStyle}"
      Height="18"
      Command="ScrollBar.LineUpCommand"
      Content="M 0 4 L 8 4 L 4 0 Z" />
            <Track
      Name="PART_Track"
      Grid.Row="1"
      IsDirectionReversed="true">
                <Track.DecreaseRepeatButton>
                    <RepeatButton 
          Style="{StaticResource ScrollBarPageButton}"
          Command="ScrollBar.PageUpCommand" />
                </Track.DecreaseRepeatButton>
                <Track.Thumb>
                    <Thumb 
          Style="{StaticResource ThumbStyle}" 
          Margin="0,0,0,0"  
       />
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                    <RepeatButton 
          Style="{StaticResource ScrollBarPageButton}"
          Command="ScrollBar.PageDownCommand" />
                </Track.IncreaseRepeatButton>
            </Track>
            <RepeatButton 
      Grid.Row="3" 
      Style="{StaticResource ScrollBarRepeatButtonStyle}"
      Height="18"
      Command="ScrollBar.LineDownCommand"
      Content="M 0 0 L 4 4 L 8 0 Z"/>
        </Grid>
   </Border>
     </ControlTemplate>

    <ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
        <Border BorderBrush="{DynamicResource BorderBrush_HorizontalTrackLayer}" Background="{DynamicResource Brush_HorizontalTrackLayer}">
            <Grid >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition MaxWidth="18"/>
                    <ColumnDefinition Width="0.00001*"/>
                    <ColumnDefinition MaxWidth="18"/>
                </Grid.ColumnDefinitions>
                <Border
      Grid.ColumnSpan="3"
      CornerRadius="0" 
       />
                <RepeatButton 
      Grid.Column="0"                           
      Style="{StaticResource ScrollBarRepeatButtonStyle}"
      Width="18"
      Command="ScrollBar.LineLeftCommand"
      Content="M 4 0 L 4 8 L 0 4 Z" />
                <Track 
      Name="PART_Track"
      Grid.Column="1"
      IsDirectionReversed="False">
                    <Track.DecreaseRepeatButton>
                        <RepeatButton 
          Style="{StaticResource ScrollBarPageButton}"
          Command="ScrollBar.PageLeftCommand" />
                    </Track.DecreaseRepeatButton>
                    <Track.Thumb>
                        <Thumb 
          Style="{StaticResource HorizontalThumbStyle}" 
          Margin="0,0,0,0"  
        />
                    </Track.Thumb>
                    <Track.IncreaseRepeatButton>
                        <RepeatButton 
          Style="{StaticResource ScrollBarPageButton}"
          Command="ScrollBar.PageRightCommand" />
                    </Track.IncreaseRepeatButton>
                </Track>
                <RepeatButton 
      Grid.Column="3" 
      Style="{StaticResource ScrollBarRepeatButtonStyle}"
      Width="18"
      Command="ScrollBar.LineRightCommand"
      Content="M 0 0 L 4 4 L 0 8 Z"/>
            </Grid>
        </Border>
    </ControlTemplate>

    <Style x:Key="ScrollBarStyle" TargetType="{x:Type ScrollBar}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="Width" Value="Auto"/>
                <Setter Property="Height" Value="18" />
                <Setter Property="Template" Value="{StaticResource HorizontalScrollBar}" />
            </Trigger>
            <Trigger Property="Orientation" Value="Vertical">
                <Setter Property="Width" Value="18"/>
                <Setter Property="Height" Value="Auto" />
                <Setter Property="Template" Value="{StaticResource VerticalScrollBar}" />
            </Trigger>
        </Style.Triggers>
    </Style>



    <!--ScrollViewer-->
    <Style TargetType="{x:Type ScrollViewer}" >
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1">
                        <Grid Background="{TemplateBinding Background}">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>

                            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
                                           Cursor="{TemplateBinding Cursor}"
                                           Margin="{TemplateBinding Padding}"
                                           ContentTemplate="{TemplateBinding ContentTemplate}"/>

                            <ScrollBar x:Name="PART_VerticalScrollBar" Width="16"
	                                       IsTabStop="False"
	                                       Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
	                                       Grid.Column="1" Grid.Row="0" Orientation="Vertical"
	                                       ViewportSize="{TemplateBinding ViewportHeight}"
										   Style="{StaticResource ScrollBarStyle}"
	                                       Maximum="{TemplateBinding ScrollableHeight}"
	                                       Minimum="0"
	                                       Value="{TemplateBinding VerticalOffset}"
	                                       IsEnabled="True"/>

                            <ScrollBar x:Name="PART_HorizontalScrollBar" Height="16"
	                                       IsTabStop="False"
	                                       Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
	                                       Grid.Column="0" Grid.Row="1" Orientation="Horizontal"
	                                       ViewportSize="{TemplateBinding ViewportWidth}"
										   Style="{StaticResource ScrollBarStyle}"
	                                       Maximum="{TemplateBinding ScrollableWidth}"
	                                       Minimum="0"
	                                       Value="{TemplateBinding HorizontalOffset}"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
</ResourceDictionary>
